<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <meta name="Content-Type" content="text/html; charset=UTF-8" />
<title>Class: Lazy</title>
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />

<script type="text/javascript" charset="utf-8">
  relpath = '';
  if (relpath != '') relpath += '/';
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>

  </head>
  <body>
    <script type="text/javascript" charset="utf-8">
      if (window.top.frames.main) document.body.className = 'frames';
    </script>
    
    <div id="header">
      <div id="menu">
  
    <a href="_index.html">Index (L)</a> &raquo; 
    
    
    <span class="title">Lazy</span>
  
  
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>

      <div id="search">
  <a id="class_list_link" href="#">Class List</a>
  <a id="method_list_link" href="#">Method List</a>
  <a id ="file_list_link" href="#">File List</a>
</div>

      <div class="clear"></div>
    </div>
    
    <iframe id="search_frame"></iframe>
    
    <div id="content"><h1>Class: Lazy 
  
  
</h1>

<dl class="box">
  
    <dt class="r1">Inherits:</dt>
    <dd class="r1">
      <span class="inheritName"><a href="Object.html" title="Object (class)">Object</a></span>
      
        <ul class="fullTree">
          <li><a href="Object.html" title="Object (class)">Object</a></li>
          
            <li class="next">Lazy</li>
          
        </ul>
        <a href="#" class="inheritanceTree">show all</a>
      
      </dd>
    
  
  
    
  
    
  
  
    <dt class="r2 last">Defined in:</dt>
    <dd class="r2 last">lib/lazyeval.rb</dd>
  
</dl>
<div class="clear"></div>




  <h2>Instance Method Summary</h2>

  <ul class="summary">
    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#initialize-instance_method" title="#initialize (instance method)">- (Lazy) <strong>initialize</strong>(obj, &amp;block) </a>
    

    
  </span>
  
    <span class="note title constructor">constructor</span>
  
  
  
  
  

  
    <span class="summary_desc">
A new instance of Lazy.

</span>
  
</li>

    
      <li class="public ">
  <span class="summary_signature">
    
      <a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(*args, &amp;block) </a>
    

    
  </span>
  
  
  
  
  

  
    <span class="summary_desc"></span>
  
</li>

    
  </ul>
<div id="constructor_details" class="method_details_list">
  <h2>Constructor Details</h2>
  
    <div class="method_details first">
  <p class="signature first" id="initialize-instance_method">
  
    - (<tt><a href="" title="Lazy (class)">Lazy</a></tt>) <strong>initialize</strong>(obj, &amp;block) 
  

  
</p><div class="docstring">
  <div class="discussion">
    <p>
A new instance of Lazy
</p>


  </div>
</div>
<div class="tags">
  
</div><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


10
11
12
13</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazyeval.rb', line 10</span>

<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='obj identifier id'>obj</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='@obj ivar id'>@obj</span><span class='comma token'>,</span> <span class='@block ivar id'>@block</span> <span class='assign token'>=</span> <span class='obj identifier id'>obj</span><span class='comma token'>,</span> <span class='block identifier id'>block</span>
  <span class='@args ivar id'>@args</span> <span class='assign token'>=</span> <span class='@done ivar id'>@done</span> <span class='assign token'>=</span> <span class='nil nil kw'>nil</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>
<div id="method_missing_details" class="method_details_list">
  <h2>Dynamic Method Handling</h2>
  <p class="notice this">
    This class handles dynamic methods through the <tt>method_missing</tt> method
    
  </p>
  
    <div class="method_details first">
  <p class="signature first" id="method_missing-instance_method">
  
    - (<tt><a href="Object.html" title="Object (class)">Object</a></tt>) <strong>method_missing</strong>(*args, &amp;block) 
  

  
</p><table class="source_code">
  <tr>
    <td>
      <pre class="lines">


15
16
17
18
19
20
21
22
23
24
25
26
27</pre>
    </td>
    <td>
      <pre class="code"><span class="info file"># File 'lib/lazyeval.rb', line 15</span>

<span class='def def kw'>def</span> <span class='method_missing identifier id'>method_missing</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
  <span class='unless unless kw'>unless</span> <span class='@done ivar id'>@done</span>
    <span class='if if kw'>if</span> <span class='notop op'>!</span><span class='@args ivar id'>@args</span> <span class='andop op'>&amp;&amp;</span> <span class='notop op'>!</span><span class='@block ivar id'>@block</span>
      <span class='@args ivar id'>@args</span><span class='comma token'>,</span> <span class='@block ivar id'>@block</span> <span class='assign token'>=</span> <span class='args identifier id'>args</span><span class='comma token'>,</span> <span class='@block ivar id'>@block</span>
      <span class='return return kw'>return</span> <span class='self self kw'>self</span>
    <span class='end end kw'>end</span>

    <span class='@res ivar id'>@res</span> <span class='assign token'>=</span> <span class='@args ivar id'>@args</span> <span class='question op'>?</span>  <span class='@obj ivar id'>@obj</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='@args ivar id'>@args</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='@block ivar id'>@block</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='@block ivar id'>@block</span><span class='dot token'>.</span><span class='call identifier id'>call</span><span class='lparen token'>(</span><span class='@obj ivar id'>@obj</span><span class='rparen token'>)</span>
    <span class='@done ivar id'>@done</span> <span class='assign token'>=</span> <span class='true true kw'>true</span>
  <span class='end end kw'>end</span>
  
  <span class='@res ivar id'>@res</span><span class='dot token'>.</span><span class='send identifier id'>send</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&amp;</span><span class='block identifier id'>block</span><span class='rparen token'>)</span>
<span class='end end kw'>end</span>
</pre>
    </td>
  </tr>
</table>
</div>
  
</div>


</div>
    
    <div id="footer">
  Generated on Tue May 11 16:34:44 2010 by 
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
  0.5.3 (ruby-1.8.6).
</div>

  </body>
</html>